<template>
  <div id="wrapper">
    <projectform :formData="itemFormData"  :mode="mode" :canEdit="!readonly" :isadd="true"></projectform>

  </div>
</template>
<script>
import projectForm from './components/form.vue';

export default {
  components: {
    projectform: projectForm,
  },
  data() {
    return {
      BACKEND_API: process.env.VUE_APP_SOURSE_MANAGE_HOST,
      readonly: this.$route.name === 'resourceView',
      mode: this.$route.name,
      itemFormData: {
        form_id: null,
        labourCost: [],
        application_type: 0,
        constants: {
          domestic_accommodation: 250,
          domestic_transportation: 0,
          domestic_meals: 150,
          foreign_accommodation: 500,
          foreign_transportation: 0,
          foreign_meals: 250,
          visa: 800,
          depreciation_rent: 1200,
          depreciation_renovation: 0,
          depreciation_house: 0,
          depreciation_computer: 5500
        },
        file_list: [],
        attachments: [],
        currency_id: 8,
        est_market_size_over_20_million: '1',
        currency: 1,
        created_at: '',
        income_check_method: '',
        est_contract_signing_date: '',
        entire_subcontract: false,
        security_level: '0',
        billing_period: '0',
        sales: '',
        labourOtherCost: [{input: []}],
        // 项目
        project_start_date: '',
        project_end_date: '',
        project_period: '',
        project_changed_start_date: '',
        project_changed_end_date: '',
        project_name: '',
        project_director: '',
        project_director_id: '',
        project_manager: '',
        project_manager_id: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: '',
        sales_id: '0',
        corporation: '',
        corporation_id: '',
        project_summary: '',
        project_change_reason: '',
        is_pre_dev: '1',
        demand_type: '',
        // 业务
        business_type: '',
        business_sub_type: '',
        // 软件
        software_platform: 0,
        software_version: '',
        // 硬件
        hardware_platform: 0,
        hardware_version: '',
        // 客户
        region: '',
        customer_full_name: '',
        customer_abrv_name: '',
        customer_region: '',
        customer_category: '',
        customer_level: '',
        is_new_customer: '1',
        is_new_market: '1',
        is_new_direction: '1',
        // 事业部/事业群
        business_department_id: '',
        business_department: '',
        business_department_manager: '',
        business_group: '',
        business_group_manager: '',
        // 产品
        product_category: '',
        product_sub_category: '',
        // 其它
        process_compliance: 0,
        defect_density: 0,
        one_time_release_success_rate: 0,
        hardware_revision_count: 0,
        // 人力投入
        manPowerColumns: [
          {field: 'id', title: '#', width: 100},
          {
            field: 'implement_department',
            title: '实施部门',
            width: 250
          },
          // {field: 'labour_type', title: '人员类型', width: 150},
          {field: 'role', title: '角色', width: 150},
          {field: 'tech_range', title: '技术领域', width: 150},
          // { field: 'module', title: '模块', width: 150 },
          // { field: 'sub_module', title: '子模块', width: 150 },
          // {field: 'k', title: '平均薪资系数', width: 120},
          {field: 'man_month', title: '工数(人周)', width: 100},
        ],
        weekCol:[],
        manPowerInput: [],
        // 收入拆分
        incomeDistribution: [],
        incomeDistributionSubmit: {},
        // 阶段点计划
        stagePlans: [],
        // 自研量产出货
        taxRate: 0,
        unitCost: 0,
        unitPriceRaw: 0,
      }
    }
  },
  created() {
  },
  mounted() {
    this.$nextTick(() => {
    })
  },
  methods: {}
}

</script>
